<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePoolsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('pools', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name')->comment('挖矿币种名称');
            $table->string('img')->comment('币种图片');
            $table->unsignedDecimal('price', 20, 8)->comment('每T算力每个月托管价格（USDT）');
            $table->unsignedInteger('min')->default(1)->comment('起步配置1T，用户可以选择增加');
            $table->unsignedDecimal('profit', 20, 8)->comment('每T算力每天产量');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('pools');
    }
}
